home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 …ember: Reference Library / Dev.CD Dec 96 RL / Dev.CD Dec 96 RL.toast / What's New? / Development Kits / Installer SDK Cornucopia 1.0 / Script Examples / Search Proc [insp] Example / Makefile < prev    next >
Encoding:
Makefile  |  1996-09-23  |  2.4 KB  |  56 lines  |  [TEXT/MPS ]

  1. # To build this example, choose the "Build…" menu item from within
  2. # the "Build" menu in MPW. When asked for Program Name, type in the 
  3. # script name, in this case "myFileSearchProc" ( without double quotes ) 
  4. # and press the Enter key. Be sure that the Current Working Directory
  5. # for MPW is set to the directory containing this example.
  6.  
  7. # To build the Debugger version of this example, choose the "Build…" 
  8. # menu item from within the "Build" menu in MPW. When asked for Program 
  9. # Name, type in the script name, in this case "myFileSearchProc.debug" 
  10. # ( without double quotes ) and press the Enter key. Be sure that the Current 
  11. # Working Directory for MPW is set to the directory containing this example.
  12.  
  13. scriptName                = myFileSearchProc
  14. debugScriptName            = "{scriptName}.debug"
  15.  
  16. ScriptCheckDir            = :::Tools:Released:ScriptCheck 4.0.3:
  17. InstallerRIncDir        = :::DeveloperInterfaces:RIncludes:
  18. InstallerDebuggerDir    = :::Tools:Released:Installer Debugger 4.0.3:
  19. InstallerCSrcDir        = :::DeveloperInterfaces:CSources:
  20. InstallerCIncDir        = :::DeveloperInterfaces:CIncludes:
  21.  
  22. # You may use this makefile to compile your own Search Procedure code segment.
  23. # Just replace the 'sourceFile' value "FindTargetFile" with the name of your 
  24. # source file ( without the .c extension ).
  25. sourceFile                = FindTargetFile
  26.  
  27.  
  28. OBJECTS                    = {sourceFile}.c.o
  29. COptions                = -b -r -sym off
  30. LinkOptions                = -mf -sym off
  31.  
  32. # create debug version of the installer script
  33. "{debugScriptName}" ƒ "{scriptName}"
  34.     Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
  35.     Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
  36.  
  37. # create installer script
  38. "{scriptName}" ƒ "{sourceFile}" "{scriptName}.r"
  39.     set theTime    "'`date -d -s` 12:00:00 PM'"
  40.     Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
  41.     SetFile -a b -d {theTime} {scriptName}
  42.     "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
  43.     SetFile -m {theTime} "{scriptName}"
  44.  
  45. # link the object file for the search procedure code segment
  46. "{sourceFile}" ƒ Makefile "{OBJECTS}"
  47.     # be sure to specify the same 'infn' ID# as the one in 'insp' definition in .r file
  48.     Link {LinkOptions} -t rsrc -c RSED -rt infn=20 -m "{sourceFile}" -sg "{sourceFile}" ∂
  49.         "{OBJECTS}" ∂
  50.         "{Libraries}Interface.o" ∂
  51.         "{Libraries}"MacRuntime.o    ∂
  52.         -o "{sourceFile}.rsrc"
  53.         
  54. "{OBJECTS}" ƒ Makefile "{sourceFile}.c"
  55.     SC {COptions} "{sourceFile}.c" -i "{InstallerCIncDir}","{InstallerCSrcDir}","{InstallerRIncDir}"
  56.